import Vue from 'vue'
import VueRouter from 'vue-router'

import Home from '../views/Home.vue'
import Welcome from '../views/Welcome.vue'
import Setting from '../views/Setting.vue'

Vue.use(VueRouter)

//路由配置
const routes = [{
        path: '/',
        component: Home,
        redirect: '/welcome',
        children: [
            {
                path: '/welcome',
                component: Welcome
            },
            {
                path: '/setting',
                component: Setting
            },
        ]
    },

]
//配置的参数的配置
const router = new VueRouter({
    mode: 'hash',
    base: process.env.BASE_URL,
    routes
})

export default router